<?php

/** @var yii\web\View $this */
/** @var yii\bootstrap5\ActiveForm $form */

/** @var app\models\LoginForm $model */

use yii\bootstrap5\ActiveForm;
use yii\bootstrap5\Html;

$this->title = 'Регистрация';

?>
<div class="site-registration">
  <h1><?= Html::encode($this->title) ?></h1>

  <p>Пожалуйста, заполните следующие поля для регистрации:</p>

  <div class="row">
    <div class="col-lg-5">
    <?php $form = ActiveForm::begin([
    'action' => ['/registration'],
    'id' => 'registration-form',
]); ?>

<?= Html::label('Имя', 'firstName') ?>
<?= Html::textInput('firstName', null, ['class' => 'form-control', 'autofocus' => true]) ?>

<?= Html::label('Фамилия', 'lastName') ?>
<?= Html::textInput('lastName', null, ['class' => 'form-control']) ?>

<?= Html::label('Email', 'email') ?>
<?= Html::textInput('email', null, ['class' => 'form-control']) ?>

<?= Html::label('Пароль', 'password') ?>
<?= Html::passwordInput('password', null, ['class' => 'form-control']) ?>

<div class="form-group">
    <div class="text-danger mb-2" id="registration-form-error"></div>
    <?= Html::submitButton('Зарегистриоваться', ['class' => 'btn btn-primary', 'name' => 'register-button']) ?>
</div>
<?php ActiveForm::end(); ?>
    </div>
  </div>
</div>